<script type="text/template" id="userInfoMoreTemplate">
  <table class="user-more-info">
    <tr>
      <td><%= APP.getTrans('NAV', 'USER_TYPE') %>:</td>
      <td><%= APP.User.getRoleLabel() %></td>
    </tr>
    <tr>
      <td><%= APP.getTrans('NAV', 'GROUP') %>:</td>
      <td><%= user.group.name %></td>
    </tr>
    <% if (user.department != null && user.department != '') { %>
      <tr>
        <td><%= APP.getTrans('NAV', 'DEPARTMENT') %>:</td>
        <td><%= user.department %></td>
      </tr>
    <% } %>
    <% if (user.company != null && user.company != '') { %>
      <tr>
        <td><%= APP.getTrans('NAV', 'COMPANY') %>:</td>
        <td><%= user.company %></td>
      </tr>
    <% } %>
    <% if (user.email != null && user.email != '') { %>
      <tr>
        <td><%= APP.getTrans('NAV', 'EMAIL') %>:</td>
        <td><%= user.email %></td>
      </tr>
    <% } %>
    <% if (user.phone != null && user.phone != '') { %>
      <tr>
        <td><%= APP.getTrans('NAV', 'PHONE') %>:</td>
        <td><%= user.phone %></td>
      </tr>
    <% } %>
    <% if (user.mobile != null && user.mobile != '') { %>
      <tr>
        <td><%= APP.getTrans('NAV', 'MOBILE') %>:</td>
        <td><%= user.mobile %></td>
      </tr>
    <% } %>
    <% if (user.lastLogin != null && user.lastLogin != '') { %>
      <tr>
        <td><%= APP.getTrans('NAV', 'LAST_LOGIN') %>:</td>
        <td><%= user.lastLogin %></td>
      </tr>
    <% } %>
  </table>
</script>
<script type="text/template" id="userInfoTemplate">
  <ul class="nav navbar-nav navbar-right set-margin">
    <% if (APP.User.isAdmin()) { %>
      <li class="ico">
        <a href="#" class="dropdown-toggle" data-toggle="dropdown"><%= APP.getTrans('NAV', 'SETTINGS') %><i class="glyphicon glyphicon-cog"></i></a>
        <ul class="dropdown-menu">
          <li><a href="#" class="gotoSettings"><%= APP.getTrans('NAV', 'USERS') %></a></li>
          <li><a href="#" class="gotoGroup"><%= APP.getTrans('NAV', 'USER_GROUPS') %></a></li>
          <li class="divider"></li>
          <li><a href="/panel"><%= APP.getTrans('NAV', 'REGISTER_APPLICATION') %></a></li>
        </ul>
      </li>
    <% } %>
    <li class="ico"><a href="#" class="com-management"><%= APP.getTrans('NAV', 'COM_MANAGEMENT') %><i class="glyphicon glyphicon-th-large"></i></a></li>
    <li><a href="javascript:void(0)" class="show-more-info"><strong><%= user.fname %> <%= user.lname %></strong> (<%= APP.getTrans('NAV', 'DATA') %>) <b class="caret"></b></a></li>
  </ul>
  <% if (user.photo != '' && user.photo != null) { %>
    <img class="avatar" src="<%= user.photo %>" />
  <% } %>
</script>